package com.springcloud.sc.ucpv5.client.commondata.data;

import com.springcloud.sc.ucpv5.client.commondata.datachange.DataExChange;
import com.google.protobuf.Message;

/**
 * Generated from IDL struct "LoginRsp".
 *
 * @author JacORB IDL compiler V 2.3-beta-2, 14-Oct-2006
 * @version generated at 2014-10-29 11:48:54
 */

public final class LoginRsp extends DataExChange {
    public LoginRsp() {
    }

    public int Result;
    public String Auth_NodeID_List = "";
    public String UcpSqlIp = "";
    public String UcpSqlPwd = "";
    public String SaveSqlIp = "";
    public String SaveSqlPwd = "";

    public LoginRsp(int Result, String Auth_NodeID_List, String UcpSqlIp, String UcpSqlPwd, String SaveSqlIp,
	    String SaveSqlPwd) {
	this.Result = Result;
	this.Auth_NodeID_List = Auth_NodeID_List;
	this.UcpSqlIp = UcpSqlIp;
	this.UcpSqlPwd = UcpSqlPwd;
	this.SaveSqlIp = SaveSqlIp;
	this.SaveSqlPwd = SaveSqlPwd;
    }

    /**
     * 从当前通用对象获取probuf对象
     * 
     * @return
     */
    public Message dataChangeCommonToProBufData() {
	try {
	    com.proto.uuos_sdk_pb.LoginRsp.Builder builder_dst = com.proto.uuos_sdk_pb.LoginRsp.newBuilder();
	    builder_dst.setAuthNodeIDList(Auth_NodeID_List);
	    builder_dst.setUcpSqlIp(UcpSqlIp);
	    builder_dst.setUcpSqlPwd(UcpSqlPwd);
	    builder_dst.setSaveSqlIp(SaveSqlIp);
	    builder_dst.setSaveSqlPwd(SaveSqlPwd);
	    builder_dst.setResult(Result);
	    Message pbMessage = builder_dst.build();
	    return pbMessage;
	} catch (Exception e) {
	    e.printStackTrace();
	}
	return null;
    }

    /**
     * 从probuf对象获取当前对象
     * 
     * @param builder_src
     * @return
     */
    public void dataChangeProBufDataToCommon(Message builder_src) {
	try {
	    com.proto.uuos_sdk_pb.LoginRsp builder_dst = (com.proto.uuos_sdk_pb.LoginRsp) builder_src;
	    Auth_NodeID_List = builder_dst.getAuthNodeIDList();
	    UcpSqlIp = builder_dst.getUcpSqlIp();
	    UcpSqlPwd = builder_dst.getUcpSqlPwd();
	    SaveSqlIp = builder_dst.getSaveSqlIp();
	    SaveSqlPwd = builder_dst.getSaveSqlPwd();
	    Result = builder_dst.getResult();
	} catch (Exception e) {
	    e.printStackTrace();
	}
    }
}
